Wiring of login with database