Added the check for username when logging in