Updated sessionmanager.php

Added a new method to generate a random key. Not sure if sha512 is secure; will update it later.