begin of user and auth management