improvements and Authentication partially implemented