Adding most of the code for the login result page