work with login
User login - refactoring