database + login fixed