fixed an error with assigning the logged in user