bug fixes for login/doLogin controller action