Made login and logout functional again