Fixed some login form bugs