Changed check from firstname to username

Added extra condition for username to be checked in lower case from
database and entered one.