registration updates db correctly but breaks the session