BUGS

1. Adding a reference to a note using the magnifying glass icon is possible even if not logged in. This results in a blank tech and shift.
SOMEWHAT FIXED. If not logged in and the partview argument is not 1, redirects to login page. (This is not the optimal solution. There 
needs to be a specific view only state.)
