student login logic functional