Added logout
Solved bugt