Refactoring. Moved login to a partial form.