Improve code workflow around login form.