Added authentication / bug fixes