add middleware call after login