improved authentication. removed debug line.