Solved authorization bugs