Refactoring password authentication to User class
Refactoring login validation method