Fixes issue with registration and login