In such a case, you need to clear your browser's cache. Next login into your database, go to the config table, search for name "two_factor_security" and change the value from 1 to 0. 


Once you do so, you will be able to login without two factor security.


Before turning two factor security on again, you should first set email driver and check whether or not you are getting emails.