refactored the manager pages into one page and fixed bugs on server side