added login view, logout logic, and other small changes