added authentication and arrow keys for commands