Use same code as CanRegister component for getting user data