Ah, then you have a few options. You could redo your database design such that you have one common table for users, and another table each for the specific types of user. This way you will lookup the common table for login credentials and thus can authenticate your users with a single login form.
Another way, especially if you find that there really is not much in common between these user types, or if you do not want to redo your database design, is to provide a drop down menu that you users must select in order to login. So, based on whether they selected "student", "professor" or "company", you run the appropriate SQL statement to check the correct table to authenticate the user.