Added functionality to User class