added admin page,made major refactoring