added session authentication and made some more changes.  If any bugs arise, please let me know.