re-wrote authentication to more closely adhere to cs50's pset7 with the use of sessions