added session time out and edited other functions

started edit a policy page and functions
cleaned up some functions