fixed login form functionality