Fixed issue with registration and password reset not working

Possibly caused by spring security implementation.