add authorization status check