User Management and User Authentication

Fixed an issue with user login and some bug fixes with user management.