move login to LoginManager