separate login and validation checks