refactor(auth) add login

Add function `login` to simplify `onClick` method and make it more extensible for future.