Refactor of sign_in, making a sign in module.