login checks credentials against database data