logout link and bugs fixed