fixed bug for unauthorized user