cleaned up login some, and added logout