Introduced userAutoLogin flag and fixed user registration.
If true, a user is automatically logged in upon successful registration.