Added database support with method for authenticating the user.