finish the view item function for the student and the logout function