With intial login check and database access