Completed basic security and authorization stuff.