Function for checking password strength. Returns weak, moderate or strong