fixed login/logout function in navbar