Make login form more robust