Added login module and fixed database connection.