Handles checkout and refreshing page now

Signed-off-by: sgargCSE <sgarg@cse.unsw.edu.au>