Fix login problems and figure out logic for different users