login form method and minor fixes