fixed the bugs in authorization of user action when not logged in