Change url to authenticated and fix login bug