add login form logic