Implemented logout and created controller to handle photouploads.