moved User class outside the database class, added login() method in database