login page that uses database, dept code on main page