} else {
         $otp = new OTP();
         if ($otp->send($student->getMobile())) {
             //$otp->send($student->getMobile()) //Send OTP
             Session::put('OTP Sending', 'OTP Sent, Verify Here');
         }
     }
     unset($cookiename);
 } else {
     if ($v == 0 || $v == 4) {
         //Student is logging in for the first time in this semester.
         //Show him his form to fill up his details
         Session::put('loggedIn', 1);
         $user = Input::get('a');
         if ($user[0] >= 0 && $user[0] <= 9) {
             $email = $ldap->getDEmail($email);
         }
         Session::put('student_email', $email);
         Redirect::to('registration.php?step=1');
     } else {
         if ($v == 3) {
             $validate->addError('This account is currently blocked because of multiple failed login attempts.');
         } else {
             if ($v == 2) {
                 $validate->addError('Your registration process is complete. Please wait/ask for approval from any authority.');
             } else {
                 if ($v == 5) {
                     /* if payment option online
                        Session::put('loggedIn', 1);
                        Session::put('student_email', Input::get('a'));
                        Redirect::to('registration.php?step=3');