the login operation queries the database now

resolves #146