additional sign in code and some route code from dec5 class