Add hook for login.