Minor - fixing PHP notices
Fixing logout method