Add user role detection and and user role dropdown select support, improve comments