Fix redirect to login page error

The error was when redirecting from pages under users/ or queries/
files.
Remove the link to login page
Move logout to top of page and reset id and name on click