fix authorization stuff