Added user sessions and login/logout methods.