check and modifile login logic