Fixed a minor bug in registering / forgottenpassword

for non-logged-in users