Added new constructor for User class
Added login function