Database added, login form logic added