fixed problem with a non logged in user being allowed to attempt post edits.
merging jan's changes with my own