fixed user model, login and logout