Register user now works correctly