Merge user related files

Some more files related to 'users' merged and existing code refactored