partially working - need to clean up authentication