[#69481374] Users cannot access the users url directly unless they have admin rights

this commit also includes refactorings

Signed-off-by: Ellie Schneiders <ems2141@gmail.com>