adds validation to log in