test if the user is logged in
added form validation