Connects to database and login handler works now