Fixed user profile parsing function and revived updating the session user on session creation