Fixed bugs regarding insertion into DB, now redirects to login.html