logout callback function moved to its controller
logout callback function moved to its controller and some code cleanup
commenting the function