fixed pep8 style issue
fixed issue with returning generator instead of tuple
removed explicit permits and fixed a bug with permit validity checking
very short expiration date for testing purposes
server should be all functioning now. next step is front-end; needs testing