code refactoring related to load-user action suggested by Sadegh