generating user and session models, refining login