implemented login with form and the user entity