ensure logged in users are authorized and reset proper id