added logout function into navbar