Some logic added, no notes for simplicity, login as admin