Refactored a bit. Removed useless password prompt