addes log in/out feature