Few changes with login and db save logic