Added Database code to User class