go to file : lib -> weblib.php
then find a function named: user_login_string
then go to its end at the line that begins with the word "return"
delete this line and put this line instead:
return "(<a $CFG->frametarget href=\"$CFG->wwwroot/login/logout.php?sesskey=".sesskey()."\">".get_string('logout').'</a>)";
then SAVE.