created sessions controller, redefined models with simple logic