Small changes to login validation