Fixed some issues on login activity and login handler