Modification to flask auth