Improved authentication checking and highlighting sourcecode fixed