Updated settings controller login/logout logic