Cleaned up is_valid_login after dirtying it before