Server-side login(generic) script - Bash Version - performance