More Updates

Added user agent check
Form token genaration
File lock definition