Minor updates to login validation code