generate user sessions model, login view and functionality