fix deserializeUser bug, now able to register, log in and out