added login form backend logic