Login functionality
connection to the db