Merge user related files

Some more files related to 'users' merged and existing code refactored story card #1820