MacOS – Mac asking for username and password on starting up

boothigh sierramacbook promacospassword

I am running MacOS High Sierra on a Macbook air and this is the screen that usually comes up on booting.
enter image description here
The mac starts up after typing the right password. From yesterday after restarting, after typing the password on this screen, a new screen comes up asking for a username and password.
This is new and has never happened before. The unusual screen looks like this
enter image description here
I have tried the username and password used in the previous screenshot but that doesnt seem to work. The wallpaper that comes up is mine hence I don't suspect a hard drive crash.
Any solutions for this problem? How to go about this?

Best Answer

Go to System Prefs -> Users & Groups and make sure the Display login window as: list of users is set as shown below in the Login Option tab on the bottom left.

Login options