Auth bug fixes
Throwing errors in place of die()