bugfix: $location not defined when creating new user