fix nullpointer on authenticate
cleanup
fix file uploads