changed check for login