Fixed database/SQL queries. Logging in works fine now!