fixed a couple of bugs related to authorization