Allows for login from database.