Changed serialization of AuthenticatePrincipal to database as JSON. Added fallback for existing access tokens so that they can be deserialized without errors.