kinda janky but login might work now
cleaned up most jshint gripes