<?php

if (core::ifPost("from") AND core::getPost("from") == "login") {

    user::connect(core::getPost());
    header("Location: /");
    exit();

} else {
    header('HTTP/1.0 401 Unauthorized');
    exit();
}