Fixed issues with user authentication.
Improved setup and minor improvements.