Fixed issues with user authentication and jslint