adding exceptions and fixing login issues