Fixed up major bugs

Fixed up issues with authentication and validation