Hooked in-memory loggin function.
Hooked login into db.