Moved Logout into a navbar function.