fixing logout function, not to modify credentials and instead fill login from cookie