Accounts.login() implementation and server test