More on login process: TODO: properly handle login event in server;
store user data on client