Fixed login. Added logout. Fixed drawing layers.