Implemented forms in basic tests app functionality

Added Django forms to simplify form generation and validation;
Modified the logic a bit and made things more stable.