Add common profile function and fix admin user function