Created database connections and added login/logout functionality