fixed authenication bug