fixed logout procedure, notifies when login errors happen