Implements `verifyLogin` and `checkValidLogin`