added "error handling"
adding user to session after login & removed some security modules