add some code for auth and sqlite