Implemented a way to redirect to the original URL after loging in