fixed bug with user authorization