Optimization and bug fixing for adding and editing users. Logout
changes.