Moved some types into types package
Login validation and cleanup