minor bug fixes, add authentication