Added better routing for logging in. Using intended,guest, and back to route the user to their intended page or a default page/previous page.