Fix security issue with becoming a user

Should resolve #734.